#打印1！ + 2 ！ + 3！ + 4！ + 5！的值-两个循环
# theSum = 0
# num = 1
# while num <= 5:
#     count = 1
#     curMul = 1
#     while count <= num:
#         curMul *= count
#         count += 1
#     theSum += curMul
#     num += 1
# print(theSum)

# #for 变量 in 可迭代对象
# #可迭代对象形式1:range(beg,end) ->[beg,end)左闭右开
# theSum = 0
# for i in range(1,6):
#     count = 1
#     for j in range(1,i+1):
#         count *= j
#     theSum += count
# print(theSum)

#打印1，100内的偶数-两个循环
# num = 1
# while num <= 100:
#     if(num % 2 == 0):
#         print(num)
#     num += 1

# for i in range(1,101):
#     if(i % 2 == 0):
#         print(i)

#打印1，10-两个循环
# num = 1
# while num <= 10:
#     print(num)
#     num += 1

# for i in range(1,11):
#     print(i)

#shift + F6进行智能重命名
# theSum = 0
# while theSum < 100:
#     print(theSum)
#     theSum += 5

# continue break
# num = 1
# while num <= 10:
#     if num == 3:
#         num += 1
#         continue
#     print(f"我吃了{num}个包子")
#     num += 1

# num = 1
# while num <= 10:
#     if num == 3:
#         num += 1
#         break
#     print(f"我吃了{num}个包子")
#     num += 1

#break计算平均数（不知道有几个数）
# theSum = 0
# count = 0
# while True:
#     a = input("输入要加和的数(分号表示输入结束): ")
#     if a == ';':
#         break
#     a = float(a)
#     theSum += a
#     count += 1
# print(f"平均数为:{theSum / count}")